package num01;

import java.sql.Array;

public class LiangShuZhiHe01 {
    public static int[] twoSum(int[] nums, int target) {
        int n = nums.length;

        for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= n-1; j++) {
                if (nums[i] + nums[j] == target){
                    return new int[]{i,j};
                }

            }
        }

        return null;
    }


    public static void main(String[] args) {
        int[] ints = new int[]{3,2,4};
        int[] ints1 = twoSum(ints, 6);
        System.out.println(ints1);

    }
}
